package string;

import java.sql.SQLOutput;

public class StringDemo {
    public static void main(String[] args){
        String s1="123abc";
        String s2="123abc";
        System.out.println(s1==s2);
        String s3="123abc";
        System.out.println(s1==s3);
        String s4=new String("123abc");
        System.out.println(s1==s4);

        String s5="123"+"abc";
        System.out.println(s5==s1);
        String s6="123";
        String s7=s6+"abc";
        System.out.println(s5==s7);

        String s8="123abc";
        String s9=new String("123abc");
        System.out.println(s8==s9);
        System.out.println(s8.equals(s9));


    }
}
